package com.lin.project.cloudnative.enums;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 *
 *
 * @description: 帖子状态枚举
 * @return:
 * @author: linhuaixu
 * @time: 2023/5/16 20:55
 */

public enum PostReviewStatusEnum {
    REVIEWING("待审核",0),
    PASS("通过",1),
    REJECT("拒绝",2);

    private final String text;

    private final int value;

    PostReviewStatusEnum(String text, int value){
        this.text=text;
        this.value=value;
    }

    /**
     *
     *
     * @description: 获取值列表
     * @return:
     * @author: linhuaixu
     * @time: 2023/5/16 20:58
     */
    public static List<Integer> getValues(){
        return Arrays.stream(values()).map(item -> item.value).collect(Collectors.toList());
    }

    public int getValue(){
        return value;
    }

    public String getText() {
        return text;
    }
}
